package hzst.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Environment;
/**
 * 常量工具类。
 * 请在项目中建立一个常量类并继承它，也可避免常量重复定义的情况出现。
 * @author wt
 *
 */
public class Constants {
	public static final String CHARSET_UTF8 = "UTF-8";
	
	public static final String EMPTY_STRING = "";
	
	public static final String PATH_SD = Environment.getExternalStorageDirectory().getPath();
	
	/**
	 * {@link Activity#startActivityForResult(Intent intent, int requestCode)}
	 * 页面发起意图时传入requestCode.
	 * {@link Activity#onActivityResult(int requestCode, int resultCode, Intent data)}
	 * 当从上一个页面返回时，根据requestCode做接下来的操作。
	 */
	public static final int REQUEST_CODE_IMG = 50;
	public static final int REQUEST_CODE_LOCALFILE = 49;
	public static final int REQUEST_CODE_CAMERA = 48;
	
	/**
	 * {@link Activity#onActivityResult(int requestCode, int resultCode, Intent data)}
	 * 当从上一个页面返回时,根据resultCode做接下来的操作。
	 * 自定义resultCode请从101开始。
	 */
	public static final int RESULT_CODE_RESFRESH_LIST = 100;//刷新列表页
	public static final int RESULT_SELECT_RESOURCE = 99;
	
	public static final String SYMBOL_AND = "&";
	public static final String SYMBOL_COMMA = ",";
	public static final String SYMBOL_EQUAL = "=";
	public static final String SYMBOL_QUESTION_MARK = "?";
	
	public static final String SUCCESS = "1";
	public static final String FAIL = "0";
	public static final String TRUE = "1";
	public static final String FALSE = "0";
}
